<?php
/*
 * Copyright notice
 * 
 * (c) 2009 MH-Dev.de, Martin Hesse <info@mh-dev.de>
 * 
 * This script is part of the MH-Dev.-Board project. The MH-Dev.-Board 
 * is free software; you can redistribute it and/or modify it under the 
 * terms of the GNU General Public License as published by 
 * the Free Software Foundation; either version 3 of the License, 
 * or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty 
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU 
 * General Public License along with this program; if not, 
 * see http://www.gnu.org/licenses/.
 */


/**
 * GetBoards
 * 
 * View Helper to get the boards-query
 * 
 * @author	Martin Hesse <info@mh-dev.de>
 * @package	MH-Dev.-Board
 */
class MHDEV_View_Helper_GetBoards extends Zend_View_Helper_Abstract
{
	/*
	 * Get the query object for the boards
	 * 
	 * @param int $uid
	 * 
	 * @return object Zend_Db
	 */
	public function GetBoards($uid)
	{
		// param
		$uid	= intval($uid);
		
		// db
		$boards	= new Boards();
		
		// query
		$query	= $boards->fetchAll('root_uid = 0 AND category_uid =' .  $uid, 'sort_uid ASC');
		
		return $query;
	}
}